1. Field of the Invention
The present invention is generally related to data networks. More specifically, the present invention is related to a system and method for temporarily storing digital information in one or more components of a data network, such as a network gateway.
2. Background
An Internet Protocol (IP) address comprises a compact numeric identifier for a computer or other device residing on a TCP/IP network. Conventional TCP/IP applications utilize IP addresses to assign a source and destination to packets for routing across a network. IP addresses are typically formatted as 32-bit numeric addresses that are written as four numbers, each of which can be between 0 and 255, separated by periods. For example, 140.252.1.54 may constitute a valid IP address. N-bit IP addresses of other lengths may be utilized as well.
However, to achieve an improved human interface to networks, users prefer to assign network devices pronounceable, easily remembered names. To this end, the Domain Name System (DNS) provides a hierarchical naming scheme for assigning high-level domain names to devices on a TCP/IP network. A typical domain name consists of a sequence of sub-names separated by a period, which serves as a delimiter character. Each individual section of the domain name is termed a label, and any suffix of a label in a domain name may be referred to as a domain. Domain names are typically written with the local label first and the top domain last (e.g., uspto.gov).
DNS also provides a distributed database system and protocol that is used by TCP/IP applications to map between high-level domain names and IP addresses. The database system is distributed in the sense that no single machine on a network holds all the mapping information. Rather, each site (e.g., university department, campus, company, or department within a company) maintains its own database of domain names and corresponding IP addresses and runs a server program that permits other devices on the network to query the database. The server program is typically referred to as a domain name server. Often, where the server program is executed on a dedicated processor, the machine itself is called the domain name server. The process by which a TCP/IP application utilizes one or more domain name servers to map a domain name to an IP address may be referred to as domain name resolution.
Because no single network machine holds all DNS mapping information, an application program executing a DNS lookup may experience lag while waiting for resolution of a domain name. To better understand this concept, an exemplary domain name resolution process will now be described in reference to a conventional network configuration 100 depicted in FIG. 1. As shown in FIG. 1, a customer premises equipment (CPE) 102 is interfaced to an IP network 106 via a network gateway device 104. The CPE 102 may comprise a personal computer, data terminal equipment, or other user device capable of executing applications that send and receive packets over the IP network 106 via the network gateway 104. As used herein, the term “network gateway” refers to any device that interfaces one or more CPE devices to a network, including but not limited to an IP network. The IP network 106 facilitates the routing of packets between the network gateway 104 and other network entities, such as a DHCP server 108, a plurality of domain name servers 110a through 110n, and a host machine 112.
The CPE 102 is assigned a primary domain name server from the plurality of domain name servers 110a through 110n. The primary domain name server is the domain name server that CPE 102 will access in the event that it needs to resolve an IP address. The primary domain name server may be assigned to the CPE 102 in a variety of ways. For example, the primary domain name server may be dynamically assigned during an exchange of Dynamic Host Configuration Protocol (DHCP) messages that occurs between the CPE 102 and the DHCP server 108 when the CPE first accesses the network 106 to receive its initial IP address assignment. The CPE 102 may also be assigned additional domain name servers that may be accessed in the event that the primary domain name server is unavailable or, in some modes of operation, when a DNS look-up to the primary domain name server fails.
In the present example, an application program running on CPE 102 is presented with a domain name for the host machine 112 for the purpose of transmitting IP packets to and/or from the host machine 112. In response, the application program invokes a software routine, sometimes called a resolver, to ascertain the IP address that corresponds to the domain name. Once invoked, the resolver generates a DNS query to the primary domain name server assigned to the CPE 102. If the DNS database in the primary domain name server contains the IP address associated with the domain name, then the primary domain name server will send a DNS response to the CPE 102 including that information.
However, if the primary domain name server does not have access to the necessary information, several additional network transactions must occur, the nature of which will depend on whether the DNS look-up is being performed in accordance with a recursive resolution protocol or an iterative resolution protocol.
If recursive resolution is being utilized, the primary domain name server will forward the DNS query to one or more alternate domain name servers via the IP network 106 to resolve the domain name. These alternate domain name servers may, in turn, generate requests to further domain name servers to resolve the query. If the domain name cannot be resolved after a predetermined number of queries, a message will be sent to the CPE 102 indicating that the DNS lookup has failed. Alternately, if the domain name is resolved, then a DNS response will be sent to the CPE 102 providing the necessary IP address information. This propagation of DNS queries between domain name servers will have the undesired effects of generating latency for TCP/IP applications running on CPE 102 and wasting bandwidth within the IP network 106.
Alternately, in accordance with an iterative resolution protocol, if the primary domain name server cannot provide the necessary mapping information, a failure message is sent to the CPE 102, which then sends a new query to additional assigned domain name servers (e.g., a secondary domain name server, a tertiary domain name server, and so on) until such time as the name is resolved or until a predetermined query limit is reached. As a result, an iterative resolution protocol also has the undesired effects of generating latency and wasting network bandwidth.
To alleviate the latency and reduced bandwidth that results from performing domain name resolution, some conventional domain name servers employ a cache of recently resolved domain names and IP addresses as well as a record of where the mapping information was obtained. When a client device queries the domain name server to resolve a name, the domain name server first determines if the name resides in the server database. If not, the domain name server examines its cache to see if the name has been recently resolved. If the required information resides in the cache, the domain name server will report the cached information to the client device along with an identification of the server from which the mapping was obtained. The client may then either use the IP address provided by the domain name server or query the server from which the mapping was originally obtained to determine that the mapping between domain name and IP address is still valid.
While the above-described caching mechanism may improve the latency and bandwidth reduction associated with some DNS look-ups, it suffers from disadvantages. For example, because the cache resides on the domain name server, it must store name and address mappings for numerous client devices. However, because server resources are finite, only a subset of the DNS mappings handled by the domain name server may be stored in the cache at any given point in time. As a result, the cached information may not always be relevant to every client on the network. In particular, where a network is very busy, a CPE on the network that transmits a DNS query may experience a high likelihood of a cache miss.
Additionally, the caching mechanism described above is selective only in the sense that it will store DNS information corresponding to the most recently queried domain names. However, this is generally not the most efficient caching algorithm for a particular CPE residing on the network or for a particular application program being executed by a network client. Furthermore, the above-described mechanism still requires, at a minimum, an exchange of messages between a client and a domain name server over the network which, by necessity, will result in some lag and reduction in bandwidth.
What is needed, then, is a system and method for performing domain name resolution that avoids the latency and reduced bandwidth associated with conventional DNS look-ups. The desired system and method should utilize domain name caching in a manner that is customized to the needs of a particular CPE or application program to reduce cache misses. Furthermore, the desired system and method should perform caching in a manner that is transparent to the CPE and does not require an access to the IP network for every instance of domain name resolution.